// UniversalQuery.net,Universal Query control for .net WinFrom developers.
// For more infomation,please visit http://www.laiyunqing.cn
// Copyright (C) 2008 laiyunqing@gmail.com. All rights reserved.
// 
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// 
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace cn.Laiyunqing.WinControls
{
    /// <summary>
    /// 
    /// </summary>
    public partial class SQLPreviewer : Form
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SQLPreviewer"/> class.
        /// </summary>
        public SQLPreviewer()
        {
            InitializeComponent();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SQLPreviewer"/> class.
        /// </summary>
        /// <param name="sql">The SQL.</param>
        public SQLPreviewer(string sql)
        {
            InitializeComponent();
            this.richTextBox1.Text = sql;  
            this.richTextBox1.SelectAll();
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            this.richTextBox1.SelectAll();
            this.richTextBox1.Copy();
        }

        private void SQLPreviewer_Load(object sender, EventArgs e)
        {

        }
    }
}